<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TestingDetail extends BaseModel
{
    protected $table = 'testing_detail';
    protected $fillable = ['name','icon','cate_id','theme','result_type','questions_count','test_times','note','time','gist','dev_union_code','customer_questionnair_id','create_by','customer_id','customer_team_id','version'];

    public function items(){
        return $this->hasMany(TestingItem::class,'testing_id');
    }


    public function developer(){
        return $this->belongsTo(TestingDeveloper::class,'dev_union_code');
    }
    
    
    public function userRecords(){
        return $this->hasMany(TestingUserRecord::class,'tid');
    }
}
